package chapter_Thread_Hospital;

public class Test {
	public static void main(String[] args) {
		MyThread s = new MyThread();
		Thread special = new Thread(s);
		
		Thread normal = Thread.currentThread();
		
		normal.setName("普通号");
		
		special.start();
		
		for(int i =0;i<50;i++) {
			System.out.println(normal.getName()+i+"号病人在看病");
			try {
				Thread.sleep(1500);
				if(i==10) {
					special.join();
				}
			}catch(InterruptedException e) {
				e.printStackTrace();
			}
		}
				
	}

}
